package com.cari.oa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

@Entity
@Table(name = "T_MARKETCOST")
public class MarketCostEntity implements Serializable {

	private static final long serialVersionUID = 1004411975618770058L;
    @Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;
    
    
    @NotNull(message = "申请人不能为空")
    @Length(max = 32, message = "申请人ID长度要小于32个字符")
    @Column(name = "APPLY_USER")
    private String applyUser; //申请人
    
    @NotNull(message = "申请时间不能为空")
    @Column(name = "APPLY_TIME")
    private Date applyTime = new Date(); //申请时间
    
    @NotNull(message = "申请事由不能为空")
    @Length(max = 500, message = "申请事由内容长度要小于500个字符")
    @Column(name = "APPLY_REASON")
    private String applyReason; //申请原因
    
    @Column(name = "ACTUAL_COST")
    private Double actualCost;	//实际金额
    
    @NotNull(message = "预算金额不能为空")
    @Column(name = "EXPECT_COST")
    private Double expectCost;	//预算金额
    
    @Length(max = 500, message = "实际支出描述内容长度要小于500个字符")
    @Column(name = "ACTUAL_DESC")
    private String actualDesc;
    
    @Length(max = 32, message = "报销人ID长度要小于32个字符")
    @Column(name = "WIPEOUT_USER")
    private String wipeoutUser;
    
    @NotNull(message = "审核状态不能为空")
    private Integer status;	//最终审核状态
    
	@NotNull(message = "各级经理审批状态不能为空")
    @Length(max = 10, message = "各级经理审批状态长度要小于10个字符")
    @Column(name = "CHECK_STATUS")
    private String checkStatus;	//00：第一位标识市场部审批状态；第二位表示大区经理审批状态
    
    private String remark;
    @NotNull(message="省份不能为空")
    @Length(max=32, message="省份的长度要小于32个字符")
    @Column(name = "PROVINCE")
    private String province;
    
    @Column(name = "market_status")
    private Integer marketstatus;	//: 0: 未审核   1：审核通过  2：审核不通过
    
    @Length(max=32, message="市场部经理名称的长度要小于32个字符")
    @Column(name = "market_manager")
    private String marketManager;
    
    @Column(name="regoin_status")
    private Integer regoinstatus;	//: 0: 未审核   1：审核通过  2：审核不通过
    
    @Column(name="regoin_manager")
    @Length(max=32, message="大区经理名称的长度要小于32个字符")
    private String regoinManager;
    
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getApplyUser() {
		return applyUser;
	}

	public void setApplyUser(String applyUser) {
		this.applyUser = applyUser;
	}

	public Date getApplyTime() {
		return applyTime;
	}

	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	public String getApplyReason() {
		return applyReason;
	}

	public void setApplyReason(String applyReason) {
		this.applyReason = applyReason;
	}

	public Double getActualCost() {
		return actualCost;
	}

	public void setActualCost(Double actualCost) {
		this.actualCost = actualCost;
	}

	public String getActualDesc() {
		return actualDesc;
	}

	public void setActualDesc(String actualDesc) {
		this.actualDesc = actualDesc;
	}

	public String getWipeoutUser() {
		return wipeoutUser;
	}

	public void setWipeoutUser(String wipeoutUser) {
		this.wipeoutUser = wipeoutUser;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
    public String getCheckStatus() {
		return checkStatus;
	}

	public void setCheckStatus(String checkStatus) {
		this.checkStatus = checkStatus;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public Double getExpectCost() {
		return expectCost;
	}

	public void setExpectCost(Double expectCost) {
		this.expectCost = expectCost;
	}


	public Integer getMarketstatus() {
		return marketstatus;
	}

	public void setMarketstatus(Integer marketstatus) {
		this.marketstatus = marketstatus;
	}

	public Integer getRegoinstatus() {
		return regoinstatus;
	}

	public void setRegoinstatus(Integer regoinstatus) {
		this.regoinstatus = regoinstatus;
	}

	public String getMarketManager() {
		return marketManager;
	}

	public void setMarketManager(String marketManager) {
		this.marketManager = marketManager;
	}

	public String getRegoinManager() {
		return regoinManager;
	}

	public void setRegoinManager(String regoinManager) {
		this.regoinManager = regoinManager;
	}
}
